package com.itheima;


import com.itheima.config.SpringConfig;
import com.itheima.dao.BookDao;
import com.itheima.service.BookService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import javax.sql.DataSource;
import java.awt.print.Book;


public class App2 {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig.class);

//        BookService bookService = ctx.getBean(BookService.class);
//        bookService.save();

        DataSource dataSource = ctx.getBean(DataSource.class);

        System.out.println(dataSource);

    }

}